<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>搜索</button>
    <input type="text" value="输入内容">
</body>
</html>
<script>
    var input=document.querySelector('input')
    var btn=document.querySelector('button');
    btn.onclick=function(){
        input.value='被单击了';
        this.disabled=true
    };
</script>